package com.minshenglife.zanzan.pub.utils;

import java.util.HashMap;
import java.util.Map;

/**
 * 职级工具类
 * @author Goldy
 *
 */
public class PostUtils {
	private static Map<String,Integer> mapPost=new HashMap<String,Integer>();
	static{
		/**给相关职级代码赋权重值*/
		mapPost.put("S", 10);
		mapPost.put("A", 9);
		mapPost.put("B", 8);
		mapPost.put("C", 7);
		mapPost.put("D", 6);
		mapPost.put("E", 5);
		mapPost.put("", 0);
		mapPost.put(null, 0);
	}
	/**
	 * 比较两个职级的大小
	 * 结果值大于零，则postCode1>postCode2
	 * 结果值等于零，则postCode1==postCode2
	 * 结果值小于零，则postCode1<postCode2
	 * @param postCode1
	 * @param postCode2
	 * @return
	 */
	public static int CompareBL(String postCode1,String postCode2){
		Integer int1=mapPost.get(postCode1);
		Integer int2=mapPost.get(postCode2);
		return int1-int2;
	}
	
}
